#ifndef GAME_H
#define GAME_H

#include <iostream>
#include <vector>
#include <cmath>		//for absolute value function
#include "Display.h"
#include "boost\smart_ptr.hpp"
#include "Movables.h"
#include "Digdug.h"
#include "Monster.h"
#include "Projectile.h"
#include "Point.h"
#include "Utilities.h"	//for delta function
#include "LevelLoader.h"
#include "Bitmap.h"
#include "Map.h"

using std::vector;
using boost::scoped_ptr;
using boost::shared_ptr;

typedef scoped_ptr<Movables> MovablePtr;
enum PlayResult {DIGDUG_DIES, MONSTER_DIES, NO_CHANGE};

class Game{

public:

	Game();

	GameResult update(Action instruction);

	Map map();
	vector<Movables*> movable_ptrs();

	int score();
	int digdugLives();
	int highScore();
	int level();

private:

	//!Data Members
	Digdug _digdug;
	vector<Monster> _monsters;
	Projectile _projectile;
	Map _map;
	int _count;
	int _score;
	int _level;
	int _monster_kill_score;
	int _high_score;
	int _lives;

	//!Private functions
	PlayResult manageDigdugActions(Action instruction);
	void updateMonsters();
	PlayResult moveObjects();
	void destroyClosestMonster();
	void plotMovablesToMap();

	void loadMap(LevelLoader &level_data);
	void loadObjects(LevelLoader &level_data);
};

#endif